package com.zjhd.sealcutting.service;

import com.zjhd.sealcutting.domain.UserInfo;
import com.zjhd.sealcutting.param.UserSearchQuery;
import com.zjhd.sealcutting.vo.SearchResult;
import com.zjhd.sealcutting.utils.response.ResponseResult;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * TODO  用户管理
 *
 * @author wangchao
 * @version 1.0
 * @date 2020/11/23 13:39
 */
public interface UserInfoService {

    /**
     * TODO  分页查询用户列表
     * @author wangchao
     * @date 2020/11/23 14:28
     * @param
     * @return
     */
    SearchResult queryUserParamlist(UserSearchQuery param)throws Exception;

    /**
     * TODO 新增用户
     * @author wangchao
     * @date 2020/11/23 15:27
     * @param
     * @return
     */
    ResponseResult insertUser(UserInfo userInfo)throws Exception;

    /**
     * TODO 修改用户信息
     * @author wangchao
     * @date 2020/11/23 15:29
     * @param
     * @return
     */
    ResponseResult updateUser(UserInfo userInfo)throws Exception;

    /**
     * TODO  查询用户详情信息
     * @author wangchao
     * @date 2020/11/23 15:30
     * @param
     * @return
     */
    UserInfo queryUserInfo(Integer id)throws Exception;

    /**
     * TODO  禁用或启用用户
     * @author wangchao
     * @date 2020/11/23 16:13
     * @param
     * @return
     */
    boolean disableOrEnableUser(Integer id,Integer type)throws Exception;

    /**
     * TODO 获取当前登录用户信息
     * @author wangchao
     * @date 2020/11/24 15:34
     * @param
     * @return
     */
    UserInfo queryCurrentUserInfo(HttpServletRequest request, HttpServletResponse response)throws Exception;

    /**
     * TODO 修改用户图像
     * @author wangchao
     * @date 2020/11/24 18:24
     * @param
     * @return
     */
    ResponseResult updateByIdPortrait(UserInfo userInfo)throws Exception;

    /**
     * TODO 修改用户信息
     * @author wangchao
     * @date 2020/11/25 10:29
     * @param
     * @return
     */
    ResponseResult updateByIdUserInfo(UserInfo record)throws Exception;

    /**
     * TODO 根据手机号和验证码判断验证码是否正确
     * @author wangchao
     * @date 2020/11/27 16:38
     * @param
     * @return
     */
    boolean isVerificationCode(String mobile,String code)throws Exception;

    /**
     * TODO 验证手机号是否存在
     * @author wangchao
     * @date 2020/12/2 15:51
     * @param
     * @return
     */
    boolean isMobile(@Param("mobile")String mobile)throws Exception;

    /**
     * TODO  查询企业集合
     * @author wangchao
     * @date 2020/12/10 15:53
     * @param
     * @return
     */
    List<String> queryGroupByCompany()throws Exception;

    /**
     * TODO  根据企业查询用户
     * @author wangchao
     * @date 2020/12/10 15:57
     * @param
     * @return
     */
    List<UserInfo> queryByCompanyUser(String company)throws Exception;

    /**
     * TODO 查询所有启用用户
     * @author wangchao
     * @date 2020/12/16 9:58
     * @param
     * @return
     */
    List<UserInfo> queryAllUser()throws Exception;

}
